<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<% 
String orderid=request.getParameter("orderid");
String bookname=null;
String bookimg=request.getParameter("bookimg");
String bookprice=request.getParameter("bookprice");
String heji2=request.getParameter("heji2");

if(request.getParameter("bookname")!=null){
	bookname = new String(request.getParameter("bookname").getBytes("iso8859-1"),"utf-8"); 
}
Connection conn=null;
Statement stm=null;
ResultSet rs=null;
String sql="select * from orders where orderid='"+orderid+"'";
try {
	Class.forName("oracle.jdbc.driver.OracleDriver");
	conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:ORCL","scott","tiger");
	stm=conn.createStatement();
	rs=stm.executeQuery(sql);
} catch (ClassNotFoundException e) {
	e.printStackTrace();
} catch (SQLException e) {
	e.printStackTrace();
}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>订单详细</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="content-type" content="text/html;charset=utf-8">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" type="text/css" href="<c:url value='desc.css'/>">
  </head>
  
<body>
<div style="width:100%;height:100%; overflow-y:scroll; border:1px solid;">
	<div class="divOrder">
	<% while(rs.next()){%>
		<span>订单号：
				<%=orderid%>&nbsp;&nbsp;&nbsp;&nbsp;
<!-- 
				(准备发货)
				(等待确认)
				(交易成功)
				(已取消)
 -->
                                 下单时间：<%=rs.getString("times")%>
		</span>
	</div>
	
	<div class="divRow">
		<div class="divContent">
			<dl>
				<dt>收货人信息</dt>
				<dd><%=rs.getString("ADDRESS")%></dd>
			</dl>
		</div>
		<div class="divContent">
			<dl>
				<dt>商品清单</dt>
				<dd>
					<table cellpadding="0" cellspacing="0">
						<tr>
							<th class="tt">商品名称</th>
							<th class="tt" align="left">单价</th>
							<th class="tt" align="left">数量</th>
							<th class="tt" align="left">小计</th>
						</tr>

						<tr style="padding-top: 20px; padding-bottom: 20px;">
							<td class="td" width="400px">
								<div class="bookname">
								  <img align="middle" width="70" src="<%=bookimg%>"/>
								  <%=bookname%>
								</div>
							</td>
							<td class="td" >
								<span>&yen;<%=bookprice%></span>
							</td>
							<td class="td">
								<span><%=rs.getString("NUMBERS")%></span>
							</td>
							<td class="td">
								<span>&yen;<%=heji2%></span>
							</td>			
						</tr>
					</table>
				</dd>
			</dl>
		</div>
		<div class="divBtn">
			<span class="spanTotal">合　　计：</span>
			<span class="price_t">&yen;<%=heji2%></span><br/>

	<a id="deliver" href="../FaHuo?orderid=<%=orderid%>">发　　货</a>
	<a id="cancel" href="../DeleteOrder?orderid=<%=orderid%>">删　　除</a>

		</div>
	</div>
	<% }%>
	</div>
</body>
</html>

